home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / diverses / leda / incl / int_set.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-15  |  1.1 KB  |  61 lines

  1. /*******************************************************************************
  2. +
  3. +  LEDA  2.1.1                                                 11-15-1991
  4. +
  5. +
  6. +  int_set.h
  7. +
  8. +
  9. +  Copyright (c) 1991  by  Max-Planck-Institut fuer Informatik
  10. +  Im Stadtwald, 6600 Saarbruecken, FRG     
  11. +  All rights reserved.
  12. *******************************************************************************/
  13.  
  14.  
  15.  
  16.  
  17. #ifndef INTSETH
  18. #define INTSETH
  19.  
  20. //------------------------------------------------------------------------------
  21. /* int_set: integer sets implemented by bit vectors                           */
  22. //------------------------------------------------------------------------------
  23.  
  24. #include <LEDA/basic.h>
  25.  
  26. class int_set {
  27.  
  28. char*  V;
  29. int size;
  30. int low;
  31. char mask[8];
  32.  
  33. public:
  34.  
  35.  int_set(int n); 
  36.  int_set(int,int); 
  37.  int_set(const int_set&);
  38. ~int_set() { delete V; } 
  39.  
  40.  
  41. void clear();
  42. void insert(int);
  43. void del(int);
  44.  
  45. int  member(int) const;
  46.  
  47. int_set& join(const int_set&);
  48. int_set& intersect(const int_set&);
  49. int_set& complement();
  50.  
  51. int_set& operator=(const int_set&);
  52.  
  53. int_set  operator|(const int_set&);
  54. int_set  operator&(const int_set&);
  55. int_set  operator~();
  56.  
  57. };
  58.  
  59. #endif
  60.